<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context 
                           http://www.springframework.org/schema/context/spring-context.xsd         
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc.xsd">


	<!-- Define the controllers using annotations -->
	<context:component-scan base-package="de.fhd.pms.ctrl" />


	<!-- support JSR303 annotation if JSR 303 validation present on classpath -->
	<mvc:annotation-driven />

	<bean
		class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
	<bean
		class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />


	<bean id="dataSource"
		class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass" value="com.mysql.jdbc.Driver" />
		<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/hitchtest" />
		<property name="user" value="hitch-user" />
		<property name="password" value="hitch-user" />
		<property name="minPoolSize" value="2" />
      	<property name="maxPoolSize" value="20" />
	</bean>
	
	<import resource="data-access-context.xml"/>
	
 	<bean id="actionDaoTest" class="de.fhd.pms.dao.ActionDaoTest">
		<property name="actionDao" ref="actionDao" />
		<property name="userDao" ref="userDao"/>
	</bean>

	<bean id="userDaoTest" class="de.fhd.pms.dao.UserDaoTest">
		<property name="userDao" ref="userDao" />
	</bean>

 	<bean id="tourDaoTest" class="de.fhd.pms.dao.TourDaoTest">
		<property name="tourDao" ref="tourDao" />
		<property name="userDao" ref="userDao" />
		<property name="actionDao" ref="actionDao" />
<!-- 		<property name="sessionFactory" ref="hibernateSessionFactory"/> -->
	</bean> 

	<bean id="usersTourDaoTest" class="de.fhd.pms.dao.UsersTourDaoTest">
		<property name="tourDao" ref="tourDao" />
		<property name="userDao" ref="userDao" />
		<property name="actionDao" ref="actionDao" />
		<property name="usersTourDao" ref="usersTourDao"/>
<!-- 		<property name="sessionFactory" ref="hibernateSessionFactory"/> -->
	</bean> 

</beans>